function  refre4(){
    backgroundVersionManagementtableI.reload('backgroundVersionManagementtableId');
}
var backgroundVersionManagementtableI = null;
layui.use(['table', 'laydate','form'], function(){
        var table = layui.table,
        laydate = layui.laydate,
        form = layui.form,
        data = null;
        laydate.render({
                elem: '#rq', //指定元素
        });

    backgroundVersionManagementtableI = table.render({
                elem: '#test'
                ,url:'/backgroundVersionManagement/getAll'
                ,toolbar:'#toolbarDemo'
                ,id:'backgroundVersionManagementtableId'
                ,page:{
                        limit:3,
                        limits:[3,6,9],
                        layout:['count','prev','page','next','limit'],
                        groups:2
                    }
                ,cols: [
                    [
                          {type: 'checkbox', fixed: 'left'}
                        ,{field:'verManId', width:120, title: '序号', sort: true}
                        ,{field:'versionNumber', width:150, title: '版本编号',align:'center'}
                        ,{field:'versionName', width:150, title: '版本名称',align:'center'}
                        ,{field:'appName', width:200, title: 'App名称',align:'center'}
                         ,{field:'versionCreator', title: '创建人',  width: 200,align:'center'}
                        ,{field:'versionCreationTime', title: '创建时间',  width: 230,align:'center'}

                        ,{fixed: '', title:'操作', minWidth: 150,toolbar: '#barDemo',align:'center'}
                ]
                ],
                skin: 'line',
                parseData:function (res){
                        return{
                                "code":res.code, // 解析接口状态
                                "msg": res.msg, // 解析提示文本
                                "count": res.count, // 解析总条数
                                "data": res.data // 解析数据列表
                        };
                }
        });

        table.on('tool(test)', function(obj){ // 双击 toolDouble
                data = obj.data;
                if(obj.event === 'see'){
                    layer.open({
                        type:2,
                        title:'详情信息',
                        content:'backgroundVersionManagementSee.html',
                        area:['850px','450px'],
                        offset: ['200px', '350px'],
                        success:function (layero,index){
                            var bo = layer.getChildFrame('body',index);
                            bo.find('input[name="versionName"]').val(data.versionName);
                            bo.find('input[name="appName"]').val(data.appName);
                            bo.find('input[name="versionCreationTime"]').val(data.versionCreationTime);
                            bo.find('input[name="serverFileName"]').val(data.serverFileName);
                            bo.find('input[name="versionNumber"]').val(data.versionNumber);
                            bo.find('input[name="versionCreator"]').val(data.versionCreator);
                            bo.find('input[name="serverFilePath"]').val(data.serverFilePath);

                        }
                    })
                }

        });

        form.on('submit(go)',function (d){
                d = d.field;
                console.log(d);
                table.reload('backgroundVersionManagementtableId',{
                        where:{
                            versionNumber:d.versionNumber,
                            versionCreationTime:d.versionCreationTime,
                            versionCreator:d.versionCreator
                        }
                });
        })
    $("#tjbut").click(function () {
        layer.open({
            type:2,
            title:'添加版本',
            content:'backgroundVersionManagementadd.html',
            area:['680px','520px'],
            offset: ['170px', '350px'],
            success:function (layero,index){
                let item = localStorage.getItem("uname");
                var bo = layer.getChildFrame('body',index);
                bo.find('input[name="versionCreator"]').val(item);
                bo.find('input[name="appName"]').val("思云课堂");
                bo.find('input[name="serverFileName"]').val("com.siyunClass.app.apk");
            }
        })
    })
});